<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue-v2.6.14.js"></script>
    <style>
        p {
            border: 1px solid red;
        }

        b{
            border: 1px solid green;
        }
    </style>
</head>
<body>
<div id="app">
   <p @mousemove="mm">
       这是一个<b @mousemove.stop>段落</b>!!!!
   </p>
</div>

</body>
<script type="text/javascript">
    new Vue({
        el: "#app",
        data: {

        },
        methods :{
            // event 鼠标事件，包含了鼠标的所有信息
            mm(event){
                // console.log("鼠标所在页面的坐标值："+event.x + "::" + event.y);
                console.log("鼠标所在p段落的坐标值："+event.offsetX + "::" + event.offsetY);
            }
        }
    });
</script>
</html>